package stu.aistar.day01.homeworkj;

import javafx.stage.Screen;

public class computer {

    private String brand;
    private double price;
    private String describe;
    private String scr;
    public computer(){}
    public computer(String brand ,double price,String describe, String scr){
        this.brand = brand;
        this.price = price;
        this.describe = describe;
        this.scr = scr;

    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getScr() {
        return scr;
    }

    public void setScr(String scr) {
        this.scr = scr;
    }

    @Override
    public String toString() {
        return "computer{" +
                "brand='" + brand + '\'' +
                ", price=" + price +
                ", describe='" + describe + '\'' +
                ", scr='" + scr + '\'' +
                '}';
    }
    public void checkprice(){
        if(price>2000||price<1000){
            price = 2000;
        }
    }
}

